// pages/album/album.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    choosed: false,
    pics: []
  },


  //选择图片
  choosepic: function () {
    var that = this
    wx.chooseImage({
      count: 9,
      sourceType: ['album'],
      sizeType: ['original'],
      success: function (res) {
        console.log(res)
        that.setData({
          pics: res.tempFilePaths,
          choosed: true
        })
      }
    })
  },

  //预览图片
  previewpic: function (e) {
    var path = e.currentTarget.dataset.path
    var urls = []
    urls.push(path)
    wx.previewImage({
      urls: urls,
    })
  },
})